<?php
    $menu_1 = '';
    $menu_2 = ' class="active"';
    $menu_3 = '';
    $menu_4 = '';
    $menu_5 = '';
    $menu_6 = '';
    $menu_7 = '';
    $menu_8 = '';
    include('header.php');
    
    $msg = array();
    $sql = "SELECT td_th FROM text_data WHERE td_id=1 OR td_id=2 ORDER BY td_id";
    $result = $db->Execute($sql);
    while (!$result->EOF)
    {
        $msg[] = nl2br($result->fields['td_th']);
        $result->MoveNext();
    }
    $result->Close();
    
    $sql = "SELECT id_path FROM img_data WHERE id_id=1 ORDER BY id_id";
    $result = $db->Execute($sql);
    $i = 1;
    while (!$result->EOF)
    {
        if(img_exists(APPPATH.'/images',$result->fields['id_path'])){
            $img = '<img src="'.SITEURL.'/images/'.$result->fields['id_path'].'" />';
        }else{
            $img = '';
        }
        $result->MoveNext();
    }
    $result->Close();;
?>
	    <div id="main_content">
		
		<div class="page_title" id="history_title">
		    <img src="images/history_title.jpg" alt="History" />
		</div>
		
		<div id="content_top">&nbsp;</div>
		<div id="content_center" class="history_content">
		    <div class="content_center_msg"><?php echo $msg[0]; ?></div>
		    <div id="history_content_img">
		    <?php echo $img; ?>
		    </div>
		    <div class="content_center_msg"><?php echo $msg[1]; ?></div>
		</div>
		<div id="content_bottom">&nbsp;</div>
		
	    </div>
<?php
    include('footer.php');
?>